package com.zwj.controller;


import com.zwj.bo.SelectWorkSubmitInfoBo;

import com.zwj.service.WorkSubmitInfoService;
import com.zwj.vo.Result;
import com.zwj.vo.SelectWorkInfoVo;

import com.zwj.vo.SelectWorkSubmitInfoVo;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 作业提交信息表 前端控制器
 * </p>
 *
 * @author zwj
 * @since 2021-07-21
 */
@RestController
@RequestMapping("/work-submit-info-entity")
public class WorkSubmitInfoController {
    private final WorkSubmitInfoService workSubmitInfoService;

    public WorkSubmitInfoController(WorkSubmitInfoService workSubmitInfoService){
        this.workSubmitInfoService = workSubmitInfoService;
    }

    @ApiOperation("作业管理")
    @PostMapping("/jobManagement_s")
    public Result<SelectWorkSubmitInfoVo> jobManagement(@RequestBody SelectWorkSubmitInfoBo selectWorkSubmitInfoBo){
        return workSubmitInfoService.jobManagement(selectWorkSubmitInfoBo);
    }
    @ApiOperation("作业任务")
    @PostMapping("/StudentTask_s/{id}")
    public Result<SelectWorkInfoVo> StudentTask(@PathVariable Integer id){
        return workSubmitInfoService.StudentTask(id);
    }
    @ApiOperation("老师批复查看批复情况")
    @PostMapping("/StudentViewApproval_s/{id}")
    public Result StudentViewApproval(@PathVariable Integer id){
        return workSubmitInfoService.StudentViewApproval(id);
    }
    @ApiOperation("提交学生答题")
    @PostMapping("/StudentAnswers_s")
    public Result StudentAnswers(Integer id,String answerRemark ){
        return workSubmitInfoService.StudentAnswers(id,answerRemark);
    }
    @ApiOperation("保存草稿")
    @PostMapping("/SaveDraft_s")
    public Result SaveDraft(Integer id,String answerRemark){
        return workSubmitInfoService.SaveDraft(id,answerRemark);
    }
    @ApiOperation("学生答题")
    @PostMapping("/ViewAnswers_s/{id}")
    public Result ViewAnswers(@PathVariable Integer id){
        return workSubmitInfoService.ViewAnswers(id);
    }
}


//    @ApiOperation(value = "学生遍历自己的作业和条件查询自己的作业", notes = "学生遍历自己的作业和条件查询自己的作业")
//    @PostMapping("/showSubmitWorkInfo")
//    public Result showSubmitWorkInfo(@RequestBody @Validated SelectWorkSubmitInfoBo selectWorkSubmitInfoBo){
//        return workSubmitInfoService.showSubmitWorkInfo(selectWorkSubmitInfoBo,null);
//    }
//    //学生查看具体作业任务信息
//    @ApiOperation(value = "学生查看具体作业任务信息", notes = "学生查看具体作业任务信息接口")
//    @PostMapping("/showSubmitWorkInfoById")
//    public Result showSubmitWorkInfoById(@RequestBody @Validated SelectByIdBo selectByIdBo){
//        return workSubmitInfoService.showSubmitWorkInfo(new SelectWorkSubmitInfoBo(),selectByIdBo.getId());
//    }
//
//    @ApiOperation(value = "处理目录下的学生答题", notes = "处理目录下的学生答题")
//    @PostMapping("/addWorkInfoAnswer")
//    public  Result addWorkInfoAnswer(@RequestBody @Validated WorkSubmitBo workSubmitBo,SelectWorkSubmitInfoBo selectWorkSubmitInfoBo){
//        return workSubmitInfoService.addWorkInfoAnswer(workSubmitBo,selectWorkSubmitInfoBo);
//    }
//    //学生暂存作业答案
//    @ApiOperation(value = "学生暂存作业答案", notes = "学生暂存作业答案接口")
//    @PostMapping("/tWorkInfoAnswer")
//    public  Result tWorkInfoAnswer(@RequestBody @Validated SelectWorkSubmitInfoBo selectWorkSubmitInfoBo){
//        return workSubmitInfoService.tWorkInfoAnswer(selectWorkSubmitInfoBo);
//    }
//    //学生查看作业答案
//    @ApiOperation(value = "学生查看作业答案", notes = "学生查看作业答案接口")
//    @PostMapping("/showWorkInfoAnswer")
//    public Result showWorkInfoAnswer(@RequestBody @Validated WorkSubmitBo workSubmitBo){
//        return workSubmitInfoService.showWorkInfoAnswer(workSubmitBo);
//    }
//
//    //学生查看作业分数
//    @PostMapping("/showWorkInfoScoreStudent")
//    @ApiOperation(value = "学生查看作业分数", notes = "学生查看作业分数接口")
//    public Result showWorkInfoScoreStudent(@RequestBody @Validated WorkSubmitBo workSubmitBo){
//        return workSubmitInfoService.showWorkInfoScoreStudent(workSubmitBo);
//    }

//}

